package cn.kgc.house.controller;

import cn.kgc.house.common.CrowdFundingConstant;
import cn.kgc.house.pojos.Order;
import cn.kgc.house.service.OrderService;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;

@Controller
@RequestMapping("/order")
public class OrderController {

    @Resource
    OrderService orderService;

    @RequestMapping("/orderindex")
public  String Orderpageinfoindex(
@RequestParam(value = "pageNum",defaultValue = "1")Integer pageNum,
@RequestParam(value = "pageSize",defaultValue = "1")Integer pageSize,
@RequestParam(value = "buildName", defaultValue = "") String buildName,
Model model
    ){
        PageInfo<Order> pageInfo=orderService.queryForKeywordSearchOrder(pageNum, pageSize, buildName);
model.addAttribute(CrowdFundingConstant.ATTR_NAME_PAGE_INFO,pageInfo);
model.addAttribute("name",buildName);
return  "body/order/order-member-list";
        }


}
